import service from "../request";

const controller = "LoginInfo"

const login = (data: any) => {
	return service({
		method: 'post',
		url: controller + '/login',
		data: data,
	})
}
const Update = (data: any) => {
	return service({
		method: 'put',
		url: controller,
		data: data
	})
}
const ChangePwd = (data: any) => {
	return service({
		method: 'post',
		url: controller + '/Changepwd',
		data: data
	})
}

const getByUser = (userId: number):any => {
	return service({
		method: 'get',
		url: controller + '/getByUser',
		params: { userId }
	})
}

export default { login, Update, ChangePwd,getByUser }
